﻿<h3 class="important-tittle">Using Linq</h3>

<div class="text-center">
    <img src="/App/Examples/v1/Filtering data/Images/linq.gif"/>
</div>

<p>
    In this example we are taking some records from our fake data base as the user changes the input.
    <i class="text-muted">DataBase.Cities</i> is no more than an array that stores our data.
</p>

<div class="doc-alert">
    To keep this example always up to date it is directly pulled from the Github repository, the
    repo for simplicity uses the <i>UserControl</i> class to wrap every example, but you can use any
    container for your plots.
</div>

<h4>Code Behind</h4>

<i class="text-muted">City.cs</i>

<pre class="prettyprint" url="https://raw.githubusercontent.com/beto-rodriguez/Live-Charts/master/Examples/Wpf/CartesianChart/Linq/City.cs"></pre>

<hr/>

<i class="text-muted">LinqExample.xaml.cs</i>

<pre class="prettyprint" url="https://raw.githubusercontent.com/beto-rodriguez/Live-Charts/master/Examples/Wpf/CartesianChart/Linq/LinqExample.xaml.cs"></pre>

<h4>XAML</h4>

<pre class="prettyprint" url="https://raw.githubusercontent.com/beto-rodriguez/Live-Charts/master/Examples/Wpf/CartesianChart/Linq/LinqExample.xaml"></pre>